#ifndef _DICT_
#define _DICT_

#include<string>
#include<string.h>
#include<fstream>
#include<iostream>
#include<vector>
#include<unordered_map>
#include<unordered_set>

using std::string;
using std::vector;
using std::unordered_map;
using std::unordered_set;

class Dictionary
{
public:
    Dictionary(string path):_path(path) 
    {
        getFile();
    }
    ~Dictionary() {}

    void getFile();

    void build(const char* filename);

    void preHandle(string &);

    void store();
private:
    string _path;
    vector<string> _files;
    unordered_map<string,int> _word;
    unordered_set<string> stop_word;
};

#endif
